#include <54func.h>
int main(int argc,char *argv[])
{
    // ./7_block_write 1.pipe
    ARGS_CHECK(argc,2);
    int fdw = open(argv[1],O_WRONLY);
    ERROR_CHECK(fdw,-1,"open");
    char buf[4096] = {0};
    int cnt = 0;//用于记录写了多少次！
    while(1){
        write(fdw,buf,sizeof(buf));//只负责写，将内容全为0的数组写入到管道中
        printf("write one,cnt = %d\n",cnt++);
    }
    close(fdw);
    return 0;
}
